package com.cykj.controller;

import com.cykj.service.CardService;
import com.cykj.util.ResponseDto;
import com.cykj.vo.CardVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/card")
public class CardController {
    @Autowired
    private CardService cardService;
    @RequestMapping("/addCardSingle")
    public ResponseDto addCardSingle(@RequestBody CardVo cardVo){
        try {
            return cardService.addCardSingle(cardVo.getPrefix(), cardVo.getStartNo(), cardVo.getEndNo());

        }catch (Exception e){
            return new ResponseDto(-1,"操作失败了",null);
        }

    }
}
